Skip to content

Added CSS build check by Actions#3713

Merged
hsbt merged 10 commits intomasterfrom
add-css-ci-check
Apr 6, 2026
Merged

Added CSS build check by Actions#3713
hsbt merged 10 commits intomasterfrom
add-css-ci-check

Conversation

@hsbt
Copy link
Copy Markdown
Member

@hsbt hsbt commented Dec 22, 2025

This is remaining work of redesign project. We should check to css build every PRs.

Copilot AI review requested due to automatic review settings December 22, 2025 03:53
@hsbt hsbt requested a review from a team as a code owner December 22, 2025 03:53
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Dec 22, 2025

Deploying www-ruby-lang-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: ac8aee3
Status: ✅  Deploy successful!
Preview URL: https://0c2b4230.www-ruby-lang-org.pages.dev
Branch Preview URL: https://add-css-ci-check.www-ruby-lang-org.pages.dev

View logs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds automated CSS build verification to the CI pipeline as part of the redesign project. The changes ensure that the compiled CSS file stays in sync with the source files by checking it on every pull request.

  • Added Node.js setup and CSS build check to the GitHub Actions CI workflow
  • Removed package-lock.json from .gitignore to track npm dependencies
  • Added package-lock.json with Tailwind CSS and typography plugin dependencies

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/ci.yml Adds Node.js setup, npm dependency installation, and CSS build verification steps before Ruby setup
.gitignore Removes package-lock.json from ignore list to track it in version control
package-lock.json Adds complete dependency tree for Tailwind CSS v3.4.17 and @tailwindcss/typography v0.5.19

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- name: Check CSS is up-to-date
run: |
npm run build-css
git diff --exit-code stylesheets/compiled.css || (echo "Error: compiled.css is out of date. Run 'npm run build-css' and commit the changes." && exit 1)
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message could be improved for clarity. Currently it says "Error: compiled.css is out of date" but it would be more helpful to specify which file needs to be regenerated and how to do it locally. Consider making the message more actionable, for example: "The compiled CSS is out of date. Please run 'npm run build-css' locally and commit the updated stylesheets/compiled.css file."

Suggested change
git diff --exit-code stylesheets/compiled.css || (echo "Error: compiled.css is out of date. Run 'npm run build-css' and commit the changes." && exit 1)
git diff --exit-code stylesheets/compiled.css || (echo "Error: The compiled CSS is out of date. Please run 'npm run build-css' locally and commit the updated stylesheets/compiled.css file." && exit 1)

Copilot uses AI. Check for mistakes.
@hsbt
Copy link
Copy Markdown
Member Author

hsbt commented Dec 22, 2025

I'm not sure why npm run build-css at GitHub Actions generate the following diff:

+.rounded{
+  border-radius: 0.25rem;
+}
+
 .rounded-2xl{
   border-radius: 1rem;
 }
@@ -4567,6 +4571,10 @@ body:is(.dark *){
   text-decoration-line: underline;
 }
...

@hsbt hsbt force-pushed the add-css-ci-check branch 2 times, most recently from e672ba1 to e3c5e42 Compare December 25, 2025 01:47
taea and others added 9 commits April 6, 2026 15:50
- Add Node.js setup and npm ci to CI workflow
- Verify compiled.css is up-to-date by rebuilding and checking for diffs
- Add package-lock.json to lock dependency versions
- Remove package-lock.json from .gitignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The compiled CSS is a build artifact that should be generated during
CI and deployment, not tracked in version control. This eliminates
merge conflicts and repository bloat from the 5,900-line generated file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Since compiled.css is no longer tracked in the repository, the CI
needs to build it before running tests. Move the Node.js setup and
CSS build steps before the test step.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The deployment workflow also needs to build CSS before Jekyll generates
the site, since compiled.css is no longer in the repository.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Since compiled.css is no longer in the repository, rake build and
rake serve need to generate it first. This also covers rake test
which depends on build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Node.js 20 reaches EOL on 2026-04-30. Switch to Node.js 22 LTS
which is supported until 2027-04-30.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hsbt hsbt force-pushed the add-css-ci-check branch from e3c5e42 to fd18959 Compare April 6, 2026 06:54
The linter scans all markdown files and fails on files inside
node_modules. Exclude the directory like other non-content paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hsbt hsbt merged commit a9a3948 into master Apr 6, 2026
3 checks passed
@hsbt hsbt deleted the add-css-ci-check branch April 6, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants